package com.ccys.db.entity;

import com.ccys.db.rely.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
* Created by Mybatis Generator on 2023/12/15
*/
@Data
@ApiModel("Promotion code,迁移时注意 type 类型变化")
@Table(name = "tbl_promo_code")
@NoArgsConstructor
@AllArgsConstructor
public class TblPromoCode extends BaseEntity {
    private String country;

    /**
     * 0:GP;1:Peadiatrics;2:OAG;3:Psychology;多个用,拼接,历史数据用的|
     */
    @Column(name = "specialisation_ids")
    @ApiModelProperty("0:GP;1:Peadiatrics;2:OAG;3:Psychology;多个用,拼接,历史数据用的|")
    private String specialisationIds;

    /**
     * 多个用,拼接,历史数据用的|
     */
    @Column(name = "subscription_ids")
    @ApiModelProperty("多个用,拼接,历史数据用的|")
    private String subscriptionIds;

    /**
     * 0:retail;1:direct corporate;2:subscription
     */
    @Column(name = "applicable_to")
    @ApiModelProperty("0:retail;1:direct corporate;2:subscription")
    private Integer applicableTo;

    /**
     * 多个用,拼接,历史数据用的|
     */
    @Column(name = "direct_corp_ids")
    @ApiModelProperty("多个用,拼接,历史数据用的|")
    private String directCorpIds;

    private String code;

    /**
     * 0:free delivery(快递费用免费);1:fixed $ off bill(账单抵扣金额);2:% off bill(账单打折);3:fixed $ off consultation(问诊费用抵扣金额);4:% off consultation(问诊费用打折);5:fixed $ off delivery(快递费用抵扣金额);6:% off delivery(快递费用打折);7:%off consultation + % off delivery(问诊费用与快递费用同时打折)
     */
    @ApiModelProperty("0:free delivery(快递费用免费);1:fixed $ off bill(账单抵扣金额);2:% off bill(账单打折);3:fixed $ off consultation(问诊费用抵扣金额);4:% off consultation(问诊费用打折);5:fixed $ off delivery(快递费用抵扣金额);6:% off delivery(快递费用打折);7:%off consultation + % off delivery(问诊费用与快递费用同时打折)")
    private Integer type;

    /**
     * 额度
     */
    @ApiModelProperty("额度")
    private BigDecimal amount;

    /**
     * 展示原价
     */
    @Column(name = "original_value")
    @ApiModelProperty("展示原价")
    private BigDecimal originalValue;

    /**
     * 展示折扣价
     */
    @Column(name = "discounted_value")
    @ApiModelProperty("展示折扣价")
    private BigDecimal discountedValue;

    @Column(name = "discount_label")
    private String discountLabel;

    /**
     * 限制次数 0 为无限
     */
    @Column(name = "limit_number")
    @ApiModelProperty("限制次数 0 为无限")
    private Integer limitNumber;//usage

    /**
     * 已使用次数
     */
    @Column(name = "used_number")
    @ApiModelProperty("已使用次数")
    private Integer usedNumber;//和limitNumber用来判断查不查出来，如果limitNumber不等于0，则需要和这个字段计算

    @Column(name = "start_date")
    private Date startDate;

    @Column(name = "end_date")
    private Date endDate;

    @Column(name = "benefit_title")
    private String benefitTitle;

    private String description;

    /**
     * 同一个人是否可重复使用，0 否 1 是
     */
    @ApiModelProperty("同一个人是否可重复使用，0 否 1 是")
    private Integer reusable;

    @Column(name = "show_on_receipt")
    private Integer showOnReceipt;

    /**
     * 印尼的设置
     */
    @Column(name = "for_id_doctor")
    @ApiModelProperty("印尼的设置")
    private Boolean forIdDoctor;

    /**
     * 印尼的设置
     */
    @Column(name = "for_sg_doctor")
    @ApiModelProperty("印尼的设置")
    private Boolean forSgDoctor;

    @Column(name = "delivery_voucher_amount")
    private BigDecimal deliveryVoucherAmount;

    @Column(name = "delivery_voucher_shipping_method")
    private String deliveryVoucherShippingMethod;

    @Column(name = "included_delivery")
    private Integer includedDelivery;

    @Column(name = "included_medication")
    private Integer includedMedication;

    @Column(name = "included_medication_amount")
    private BigDecimal includedMedicationAmount;

    private Integer status;

    /**
     * 保留
     */
    @ApiModelProperty("保留")
    private Integer stackable;

    /**
     * 在账单折扣的情况下，排除的药物列表
     */
    @Column(name = "drug_exclusion_list")
    @ApiModelProperty(value = "在账单折扣的情况下，排除的药物列表",name = "drugExclusionList")
    private String drugExclusionList;

    /**
     * 在账单折扣的情况下，排除的诊断列表
     */
    @Column(name = "diagnosis_exclusion_list")
    @ApiModelProperty(value = "在账单折扣的情况下，排除的诊断列表",name = "diagnosisExclusionList")
    private String diagnosisExclusionList;

    /**
     * 在账单折扣的情况下，是否可以含税折扣
     */
    @Column(name = "apply_promo_after_tax")
    @ApiModelProperty(value = "在账单折扣的情况下，是否可以含税折扣(0-1)",name = "applyPromoAfterTax")
    private Integer applyPromoAfterTax;

    /**
     * 印尼支票
     */
    @Column(name = "delivery_voucher")
    @ApiModelProperty(value = "印尼支票",name = "deliveryVoucher")
    private String deliveryVoucher;
}